package com.example.eeuse.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.eeuse.mapper.mysql.AuditLogMapper;
import com.example.eeuse.pojo.po.AuditLogPo;
import com.example.eeuse.service.AuditLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author liluming
 * @className: AuditLogServiceImpl
 * @description:
 * @date 2023/8/20 10:59 下午
 */
@Service
public class AuditLogServiceImpl implements AuditLogService {


    @Autowired
    private AuditLogMapper auditLogMapper;

    @Override
    @Transactional
    public IPage<AuditLogPo> list() {
        QueryWrapper<AuditLogPo> queryWrapper = new QueryWrapper<>();
        queryWrapper
                .select("id","business_obj","oper_type","first_name","last_name","email","role_name","created_time");
        Page<AuditLogPo> page = new Page<>(1, 10);

        return auditLogMapper.selectPage(page, queryWrapper);
    }
}
